<?php

//
// Stone大叔💯 
// ============================================================================
// ----------------------------------------------------------------------------
// <><><><><><><><><><><><><>有妹子加微信不哦！~<><><><><><><><><><><><><><><><>
// ----------------------------------------------------------------------------
// ============================================================================
// $Author: Stone大叔💯 $
// $Z Stone大叔💯 $
//

namespace Stone\Core;

class Hook {
    static private $_H   =   NULL;

    static public function init() {
        $Hooks  =   array();        
        $appHookFile      =     ROOT_PATH   .   CONFIG_PATH  . "Hook.php";
        $stoneHookFile    =     FRAMEWORK_PATH   .   CONFIG_PATH  . "Hook.php"; 
        defined('APP_PATH') && $appHookFile      =     APP_PATH   .   CONFIG_PATH  . "Hook.php";        
        if(file_exists($appHookFile)){
            $Hooks  =   include_once $appHookFile;             
            self::$_H   =   array_merge(self::$_H , $Hooks);
        }        
        if(file_exists($stoneHookFile)){
            $Hooks  =   include_once $stoneHookFile;             
            self::$_H   =   array_merge(self::$_H , $Hooks);
        }
        
        if(isset($appHookFile) && file_exists($stoneHookFile)){
            $Hooks  =   include_once $stoneHookFile;             
            self::$_H   =   array_merge(self::$_H , $Hooks);
        }        
    }
    
    static public function start($name) {
        if(isset(self::$_H[$name]) && !empty(self::$_H[$name])){
            
        }
    }
}
